TOOL.Category			= "Mineral Mining";
TOOL.Name				= "Mining Lasers";

TOOL.DeviceName			= "Mining Laser"
TOOL.DeviceNamePlural	= "Mining Lasers"
TOOL.ClassName			= "mining_laser_tool"

TOOL.DevSelect			= true
TOOL.CCVar_type			= "mining_laser_medium"
TOOL.CCVar_sub_type		= "medium"
TOOL.CCVar_model		= "models/slyfo_2/protorover_eng_sf2m.mdl"

TOOL.Limited			= true
TOOL.LimitName			= "mining_laser_limit"
TOOL.Limit				= 10

CAFToolSetup.SetLang("Mining Lasers","Create Mining Lasers attached to any surface.","Left-Click: Spawn a Mining Laser.")

if (CLIENT and GetConVarNumber("CAF_UseTab") == 1) then TOOL.Tab = "Custom Addon Framework" end

function TOOL.EnableFunc()
	if not CAF then
		return false;
	end
	if not CAF.GetAddon("Resource Distribution") or not CAF.GetAddon("Resource Distribution").GetStatus() then
		return false;
	end
	return true;
end

TOOL.ExtraCCVars = {
}

function TOOL.ExtraCCVarsCP( tool, panel )
end

function TOOL:GetExtraCCVars()
	local Extra_Data = {}
	return Extra_Data
end

local function mining_laser_func(ent,type,sub_type,devinfo,Extra_Data,ent_extras) 
	CAF.GetAddon("Resource Distribution").RegisterNonStorageDevice(ent)
	
	ent:SetLType(ent_extras.LaserType)
end

TOOL.Devices = {
	mining_laser = {
		Name	= "Mining Lasers",
		type	= "mining_laser",
		class	= "mining_laser",
		func	= mining_laser_func,
		devices = {
			large = {
				Name	= "Large Mining Laser ",
				model	= "models/slyfo/ftl_drive.mdl",
				ent_extras = { LaserType = 1 },
			},
			medium = {
				Name	= "Medium Mining Laser ",
				model	= "models/slyfo_2/protorover_eng_sf2m.mdl",
				ent_extras = { LaserType = 2 },
			},
			small = {
				Name	= "Small Mining Laser ",
				model	= "models/props_phx/life_support/crylaser_small.mdl",
				ent_extras = { LaserType = 3 }
			},
		}	
	},
}